home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET
/
BCI NET Dec 94.iso
/
archives
/
programming
/
gui
/
precog.lzh
/
StringList.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-12-12
|
1KB
|
54 lines
#ifndef STRINGLIST_H
#define STRINGLIST_H
#include <exec/types.h>
typedef struct StringList
{
char **Entries; /* Pointer to an array of strings. */
UBYTE *Qualifiers; /* An array of byte flags */
USHORT nEntries; /* # of entries. */
} StringList;
void StringList_Init( StringList *slist, BOOL Qualify );
/*
** If 'Qualify == TRUE', then the Qualifier array is used,
** otherwise it is not.
*/
BOOL StringList_AddString( StringList *slist,
char *string,
BYTE qualifier );
/*
** Returns false if couldn't allocate memory.
*/
BOOL StringList_AddStrings( StringList *slist,
char **strings,
BYTE *qualifiers );
/*
** This is an easy way of adding a set of strings to a list.
** 'strings' is a NULL terminated list of strings that you
** added (e.g. {"This", "That", "The other", NULL}; )
** 'qualifiers', if not NULL, is an array of BYTE values
** to use as the qualifiers. (These do NOT need to be NULL
** terminated).
*/
BOOL StringList_DeleteString( StringList *slist, USHORT n );
/*
** 'n' is the ordinal number of the string from the
** beginning of the list.
*/
BOOL StringList_DeleteAllStrings( StringList *slist );
void StringList_Sort( StringList *slist );
BOOL StringList_Dup( StringList *source, StringList *target );
#endif